{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "207a1d61",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-20T02:06:27.525560Z",
     "start_time": "2022-05-20T02:06:20.363233Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['ADJUST_NONE',\n",
       " 'ADJUST_POST',\n",
       " 'ADJUST_PREV',\n",
       " 'AlgoOrderStatus_Pause',\n",
       " 'AlgoOrderStatus_PauseAndCancelSubOrders',\n",
       " 'AlgoOrderStatus_Resume',\n",
       " 'AlgoOrderStatus_Unknown',\n",
       " 'CancelOrderRejectReason_AlreadyInPendingCancel',\n",
       " 'CancelOrderRejectReason_BrokerOption',\n",
       " 'CancelOrderRejectReason_OrderFinalized',\n",
       " 'CancelOrderRejectReason_UnknownOrder',\n",
       " 'CashPositionChangeReason_Delivery',\n",
       " 'CashPositionChangeReason_Dividend',\n",
       " 'CashPositionChangeReason_Inout',\n",
       " 'CashPositionChangeReason_Trade',\n",
       " 'CashPositionChangeReason_Unknown',\n",
       " 'Context',\n",
       " 'ExecType_Calculated',\n",
       " 'ExecType_CancelRejected',\n",
       " 'ExecType_Canceled',\n",
       " 'ExecType_DoneForDay',\n",
       " 'ExecType_Expired',\n",
       " 'ExecType_New',\n",
       " 'ExecType_OrderStatus',\n",
       " 'ExecType_PendingCancel',\n",
       " 'ExecType_PendingNew',\n",
       " 'ExecType_PendingReplace',\n",
       " 'ExecType_Rejected',\n",
       " 'ExecType_Restated',\n",
       " 'ExecType_Stopped',\n",
       " 'ExecType_Suspended',\n",
       " 'ExecType_Trade',\n",
       " 'ExecType_TradeCancel',\n",
       " 'ExecType_TradeCorrect',\n",
       " 'ExecType_Unknown',\n",
       " 'MODE_BACKTEST',\n",
       " 'MODE_LIVE',\n",
       " 'MODE_UNKNOWN',\n",
       " 'OrderBusiness_BOND_CONVERTIBLE_BUY',\n",
       " 'OrderBusiness_BOND_CONVERTIBLE_CALL',\n",
       " 'OrderBusiness_BOND_CONVERTIBLE_PUT',\n",
       " 'OrderBusiness_BOND_CONVERTIBLE_PUT_CANCEL',\n",
       " 'OrderBusiness_BOND_RRP',\n",
       " 'OrderBusiness_CREDIT_BOC',\n",
       " 'OrderBusiness_CREDIT_BOM',\n",
       " 'OrderBusiness_CREDIT_BOM_VIP',\n",
       " 'OrderBusiness_CREDIT_CI',\n",
       " 'OrderBusiness_CREDIT_CO',\n",
       " 'OrderBusiness_CREDIT_CPOM',\n",
       " 'OrderBusiness_CREDIT_CPOSS',\n",
       " 'OrderBusiness_CREDIT_DRC',\n",
       " 'OrderBusiness_CREDIT_DRC_VIP',\n",
       " 'OrderBusiness_CREDIT_DRS',\n",
       " 'OrderBusiness_CREDIT_DRS_VIP',\n",
       " 'OrderBusiness_CREDIT_RCBSS',\n",
       " 'OrderBusiness_CREDIT_RCBSS_VIP',\n",
       " 'OrderBusiness_CREDIT_RSBBS',\n",
       " 'OrderBusiness_CREDIT_RSBBS_VIP',\n",
       " 'OrderBusiness_CREDIT_SOC',\n",
       " 'OrderBusiness_CREDIT_SS',\n",
       " 'OrderBusiness_CREDIT_SS_VIP',\n",
       " 'OrderBusiness_ETF_BUY',\n",
       " 'OrderBusiness_ETF_RED',\n",
       " 'OrderBusiness_FUND_BUY',\n",
       " 'OrderBusiness_FUND_CONVERT',\n",
       " 'OrderBusiness_FUND_MERGE',\n",
       " 'OrderBusiness_FUND_RED',\n",
       " 'OrderBusiness_FUND_SPLIT',\n",
       " 'OrderBusiness_FUND_SUB',\n",
       " 'OrderBusiness_FUTURE_BUY_CLOSE',\n",
       " 'OrderBusiness_FUTURE_BUY_CLOSE_TODAY',\n",
       " 'OrderBusiness_FUTURE_BUY_CLOSE_YESTERDAY',\n",
       " 'OrderBusiness_FUTURE_BUY_OPEN',\n",
       " 'OrderBusiness_FUTURE_SELL_CLOSE',\n",
       " 'OrderBusiness_FUTURE_SELL_CLOSE_TODAY',\n",
       " 'OrderBusiness_FUTURE_SELL_CLOSE_YESTERDAY',\n",
       " 'OrderBusiness_FUTURE_SELL_OPEN',\n",
       " 'OrderBusiness_IPO_BUY',\n",
       " 'OrderBusiness_NORMAL',\n",
       " 'OrderBusiness_STOCK_BUY',\n",
       " 'OrderBusiness_STOCK_SELL',\n",
       " 'OrderDuration_AHT',\n",
       " 'OrderDuration_FAK',\n",
       " 'OrderDuration_FOK',\n",
       " 'OrderDuration_GFA',\n",
       " 'OrderDuration_GFD',\n",
       " 'OrderDuration_GFS',\n",
       " 'OrderDuration_GTC',\n",
       " 'OrderDuration_GTD',\n",
       " 'OrderDuration_Unknown',\n",
       " 'OrderQualifier_B5TC',\n",
       " 'OrderQualifier_B5TL',\n",
       " 'OrderQualifier_BOC',\n",
       " 'OrderQualifier_BOP',\n",
       " 'OrderQualifier_Unknown',\n",
       " 'OrderRejectReason_AccountDisabled',\n",
       " 'OrderRejectReason_AccountDisconnected',\n",
       " 'OrderRejectReason_AccountLoggedout',\n",
       " 'OrderRejectReason_IllegalAccountId',\n",
       " 'OrderRejectReason_IllegalPrice',\n",
       " 'OrderRejectReason_IllegalStrategyId',\n",
       " 'OrderRejectReason_IllegalSymbol',\n",
       " 'OrderRejectReason_IllegalVolume',\n",
       " 'OrderRejectReason_NoEnoughCash',\n",
       " 'OrderRejectReason_NoEnoughPosition',\n",
       " 'OrderRejectReason_NotInTradingSession',\n",
       " 'OrderRejectReason_OrderTypeNotSupported',\n",
       " 'OrderRejectReason_RiskRuleCheckFailed',\n",
       " 'OrderRejectReason_Throttle',\n",
       " 'OrderRejectReason_Unknown',\n",
       " 'OrderSide_Buy',\n",
       " 'OrderSide_Sell',\n",
       " 'OrderSide_Unknown',\n",
       " 'OrderStatus_AcceptedForBidding',\n",
       " 'OrderStatus_Calculated',\n",
       " 'OrderStatus_Canceled',\n",
       " 'OrderStatus_DoneForDay',\n",
       " 'OrderStatus_Expired',\n",
       " 'OrderStatus_Filled',\n",
       " 'OrderStatus_New',\n",
       " 'OrderStatus_PartiallyFilled',\n",
       " 'OrderStatus_PendingCancel',\n",
       " 'OrderStatus_PendingNew',\n",
       " 'OrderStatus_PendingReplace',\n",
       " 'OrderStatus_Rejected',\n",
       " 'OrderStatus_Stopped',\n",
       " 'OrderStatus_Suspended',\n",
       " 'OrderStatus_Unknown',\n",
       " 'OrderStyle_Percent',\n",
       " 'OrderStyle_TargetPercent',\n",
       " 'OrderStyle_TargetValue',\n",
       " 'OrderStyle_TargetVolume',\n",
       " 'OrderStyle_Unknown',\n",
       " 'OrderStyle_Value',\n",
       " 'OrderStyle_Volume',\n",
       " 'OrderType_Limit',\n",
       " 'OrderType_Market',\n",
       " 'OrderType_Stop',\n",
       " 'OrderType_Unknown',\n",
       " 'PositionEffect_Close',\n",
       " 'PositionEffect_CloseToday',\n",
       " 'PositionEffect_CloseYesterday',\n",
       " 'PositionEffect_Open',\n",
       " 'PositionEffect_Unknown',\n",
       " 'PositionSide_Long',\n",
       " 'PositionSide_Short',\n",
       " 'PositionSide_Unknown',\n",
       " 'PositionSrc_L1',\n",
       " 'PositionSrc_L2',\n",
       " 'PositionSrc_Unknown',\n",
       " 'SEC_TYPE_BOND',\n",
       " 'SEC_TYPE_BOND_CONVERTIBLE',\n",
       " 'SEC_TYPE_CONFUTURE',\n",
       " 'SEC_TYPE_CREDIT',\n",
       " 'SEC_TYPE_FUND',\n",
       " 'SEC_TYPE_FUTURE',\n",
       " 'SEC_TYPE_INDEX',\n",
       " 'SEC_TYPE_OPTION',\n",
       " 'SEC_TYPE_STOCK',\n",
       " '__all__',\n",
       " '__builtins__',\n",
       " '__cached__',\n",
       " '__doc__',\n",
       " '__file__',\n",
       " '__loader__',\n",
       " '__name__',\n",
       " '__package__',\n",
       " '__path__',\n",
       " '__spec__',\n",
       " '__version__',\n",
       " 'absolute_import',\n",
       " 'add_parameter',\n",
       " 'algo_order',\n",
       " 'algo_order_cancel',\n",
       " 'algo_order_pause',\n",
       " 'algo_smart_reorder',\n",
       " 'algo_smart_reorder_cancel',\n",
       " 'basic',\n",
       " 'bond',\n",
       " 'bond_convertible_call',\n",
       " 'bond_convertible_put',\n",
       " 'bond_convertible_put_cancel',\n",
       " 'bond_reverse_repurchase_agreement',\n",
       " 'calc',\n",
       " 'command_argv',\n",
       " 'credit',\n",
       " 'credit_buying_on_collateral',\n",
       " 'credit_buying_on_margin',\n",
       " 'credit_collateral_in',\n",
       " 'credit_collateral_out',\n",
       " 'credit_get_borrowable_instruments',\n",
       " 'credit_get_borrowable_instruments_positions',\n",
       " 'credit_get_cash',\n",
       " 'credit_get_collateral_instruments',\n",
       " 'credit_get_contracts',\n",
       " 'credit_repay_cash_by_selling_share',\n",
       " 'credit_repay_cash_directly',\n",
       " 'credit_repay_share_by_buying_share',\n",
       " 'credit_repay_share_directly',\n",
       " 'credit_selling_on_collateral',\n",
       " 'credit_short_selling',\n",
       " 'current',\n",
       " 'fund',\n",
       " 'fund_buy',\n",
       " 'fund_etf_buy',\n",
       " 'fund_etf_redemption',\n",
       " 'fund_redemption',\n",
       " 'fund_subscribing',\n",
       " 'get_algo_child_orders',\n",
       " 'get_algo_orders',\n",
       " 'get_concept',\n",
       " 'get_constituents',\n",
       " 'get_continuous_contracts',\n",
       " 'get_dividend',\n",
       " 'get_execution_reports',\n",
       " 'get_expire_rest_days',\n",
       " 'get_fundamentals',\n",
       " 'get_fundamentals_n',\n",
       " 'get_history_bars_l2',\n",
       " 'get_history_constituents',\n",
       " 'get_history_instruments',\n",
       " 'get_history_l2bars',\n",
       " 'get_history_l2orders',\n",
       " 'get_history_l2orders_queue',\n",
       " 'get_history_l2ticks',\n",
       " 'get_history_l2transactions',\n",
       " 'get_history_ticks_l2',\n",
       " 'get_history_transaction_l2',\n",
       " 'get_industry',\n",
       " 'get_instrumentinfos',\n",
       " 'get_instruments',\n",
       " 'get_next_trading_date',\n",
       " 'get_orders',\n",
       " 'get_previous_trading_date',\n",
       " 'get_sector',\n",
       " 'get_strerror',\n",
       " 'get_trading_dates',\n",
       " 'get_trading_times',\n",
       " 'get_unfinished_orders',\n",
       " 'get_varietyinfos',\n",
       " 'get_version',\n",
       " 'getopt',\n",
       " 'history',\n",
       " 'history_n',\n",
       " 'ipo',\n",
       " 'ipo_buy',\n",
       " 'ipo_get_instruments',\n",
       " 'ipo_get_lot_info',\n",
       " 'ipo_get_match_number',\n",
       " 'ipo_get_quota',\n",
       " 'log',\n",
       " 'option_calculate_delta',\n",
       " 'option_calculate_gamma',\n",
       " 'option_calculate_greeks',\n",
       " 'option_calculate_hv',\n",
       " 'option_calculate_iv',\n",
       " 'option_calculate_ivsurface',\n",
       " 'option_calculate_price',\n",
       " 'option_calculate_rho',\n",
       " 'option_calculate_t',\n",
       " 'option_calculate_theta',\n",
       " 'option_calculate_vega',\n",
       " 'option_covered_close',\n",
       " 'option_covered_open',\n",
       " 'option_exercise',\n",
       " 'option_get_delisted_dates',\n",
       " 'option_get_exercise_prices',\n",
       " 'option_get_symbols_by_exchange',\n",
       " 'option_get_symbols_by_in_at_out',\n",
       " 'option_preorder_sell_margin',\n",
       " 'option_preorder_valid_volume',\n",
       " 'order_batch',\n",
       " 'order_cancel',\n",
       " 'order_cancel_all',\n",
       " 'order_close_all',\n",
       " 'order_percent',\n",
       " 'order_target_percent',\n",
       " 'order_target_value',\n",
       " 'order_target_volume',\n",
       " 'order_value',\n",
       " 'order_volume',\n",
       " 'print_function',\n",
       " 'py_gmi_set_version',\n",
       " 'query',\n",
       " 'raw_func',\n",
       " 'run',\n",
       " 'schedule',\n",
       " 'sdk_lang',\n",
       " 'sdk_version',\n",
       " 'set_account_id',\n",
       " 'set_mfp',\n",
       " 'set_parameter',\n",
       " 'set_serv_addr',\n",
       " 'set_serv_addr_v5',\n",
       " 'set_token',\n",
       " 'stop',\n",
       " 'subscribe',\n",
       " 'sys',\n",
       " 'timer',\n",
       " 'timer_stop',\n",
       " 'trade',\n",
       " 'unicode_literals',\n",
       " 'unsubscribe',\n",
       " 'ver_info']"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from gm import api\n",
    "from inspect import signature\n",
    "# signature(api.run)\n",
    "dir(api)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "dbcf9678",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-20T02:07:16.695472Z",
     "start_time": "2022-05-20T02:07:16.663241Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['__annotations__',\n",
       " '__call__',\n",
       " '__class__',\n",
       " '__closure__',\n",
       " '__code__',\n",
       " '__defaults__',\n",
       " '__delattr__',\n",
       " '__dict__',\n",
       " '__dir__',\n",
       " '__doc__',\n",
       " '__eq__',\n",
       " '__format__',\n",
       " '__ge__',\n",
       " '__get__',\n",
       " '__getattribute__',\n",
       " '__globals__',\n",
       " '__gt__',\n",
       " '__hash__',\n",
       " '__init__',\n",
       " '__init_subclass__',\n",
       " '__kwdefaults__',\n",
       " '__le__',\n",
       " '__lt__',\n",
       " '__module__',\n",
       " '__name__',\n",
       " '__ne__',\n",
       " '__new__',\n",
       " '__qualname__',\n",
       " '__reduce__',\n",
       " '__reduce_ex__',\n",
       " '__repr__',\n",
       " '__setattr__',\n",
       " '__sizeof__',\n",
       " '__str__',\n",
       " '__subclasshook__']"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dir(api.log)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:jupyter] *",
   "language": "python",
   "name": "conda-env-jupyter-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
